-include rules.mk

TEST_RES := bin/game

SRCS = ./src/main.c

-include ./src/obj.mk

all : $(LIB) $(TEST_RES)

$(OBJDIR)/%.o : ./src/%.c
	$(CC) -c -fPIC $^ $(INCLUDDIR) -o $@ -Wall

$(LIB) : $(OBJECTS)
	$(CC) -g -shared -o $@ $(OBJECTS)

$(TEST_RES) : $(SRCS)
	$(CC) $(SRCS) $(INCLUDDIR) $(LIBDIR) $(LIB_DIR) -o $@

.PHONY : clean
clean :
	rm -rf $(OBJECTS) $(TEST_RES) $(LIB)
